package edu.washington.cs.workflow.recommender;

import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

import edu.washington.cs.workflow.analysis.AnalysisBuilder;
import edu.washington.cs.workflow.analysis.UIActionIdentifier;
import edu.washington.cs.workflow.util.Utils;

/**
 * An alternative approach for comparison purpose
 * */
public class ReplacementActionRecommender_Static extends ReplacementActionRecommender {

	private final AnalysisBuilder builder;
	private final UIActionIdentifier identifier;
	
	public ReplacementActionRecommender_Static(String oldTraceFile,
			String[] newTraceFiles, AnalysisBuilder builder) {
		super(oldTraceFile, newTraceFiles);
		Utils.checkNotNull(builder);
		this.builder = builder;
		this.identifier = new UIActionIdentifier(builder);
	}

	@Override
	protected Set<String> queryTriggeringAction(String methodDesc, @Deprecated EventTraceProcessor[] newProcessors) {
		//replace it with quering the static analysis results
		Set<String> set = this.identifier.getGUIObjectInstances(methodDesc);
		return set;
		
	}
}
